'''
主页面
'''
import allure
from appium.webdriver.common.appiumby import AppiumBy

from wework_frame.base.wework_app import WeWorkApp
from wework_frame.page.address_list_page import AddressListPage


class MainPage(WeWorkApp):
    __CONTACT_BTN = AppiumBy.XPATH, "//*[@text='通讯录']"

    @allure.step("点击通讯录按钮，跳转导通讯录页面")
    def goto_address_page(self):
        # self.driver.find_element(AppiumBy.XPATH, "//*[@text='通讯录']").click()
        self.find_and_click(*self.__CONTACT_BTN)
        return AddressListPage(self.driver)
